﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TimeTracker.Entities
{
    public class Entry
    {
        public string Id { get; set; }
        public string UserId { get; set; }
        public string ProjectId { get; set; }
        public string ClientId { get; set; }

        public string Description { get; set; }        

        public DateTime LastStartTime { get; set; }
        public TimeSpan ElapsedTime { get; set; }

        public bool IsActive { get; set; }

        public Entry()
        {
            this.ElapsedTime = TimeSpan.Zero;
            this.LastStartTime = DateTime.Now;
        }

        public Entry(Entry entry)
        {
            this.UserId = entry.UserId;
            this.ProjectId = entry.ProjectId;
            this.ClientId = entry.ClientId;
            this.Description = entry.Description;

            this.ElapsedTime = TimeSpan.Zero;
            this.LastStartTime = DateTime.Now;
        }
    }
}
